package com.google.code.opengw.http;

public class HTTPParameter {
	private String name;
	private String value;
	
	public HTTPParameter(String parameterLine){
		String[] arr = parameterLine.split("=");
		name = arr[0];
		if(arr.length == 2)
			value = arr[1];
	}
	
	public String getParameterLine(){
		StringBuilder builder = new StringBuilder();
		builder.append(name);
		if(value != null){
			builder.append("=").append(value);
		}
		return builder.toString();
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	
}
